home *** CD-ROM | disk | FTP | other *** search
/ boe.pres.k12.wv.us / boe.pres.k12.wv.us.zip / boe.pres.k12.wv.us / Utilities / Xerox Workcentre 5335 / Windows Utilities / Font Management Utility / espanol / Xerox Font Management Utility.msi / Data1.cab / F3725_Fmu.chm / skinsupport / madcapbodyend.js < prev    next >
Text File  |  2009-07-16  |  3KB  |  133 lines

  1. // {{MadCap}} //////////////////////////////////////////////////////////////////
  2. // Copyright: MadCap Software, Inc - www.madcapsoftware.com ////////////////////
  3. ////////////////////////////////////////////////////////////////////////////////
  4. // <version>3.0.0.0</version>
  5. ////////////////////////////////////////////////////////////////////////////////
  6.  
  7. var gDocumentOnclickFunction    = document.onclick;
  8. var gDocumentOnclickFuncs        = new Array();
  9.  
  10. gDocumentOnclickFuncs.push( FMCClickHandler );
  11.  
  12. document.onclick = function( e )
  13. {
  14.     gDocumentOnclickFunction ? gDocumentOnclickFunction() : false;
  15.     
  16.     for ( var i = 0; i < gDocumentOnclickFuncs.length; i++ )
  17.     {
  18.         gDocumentOnclickFuncs[i]( e );
  19.     }
  20. };
  21.  
  22. function FMCCheckForBookmarkInternal( a )
  23. {
  24.     var hrefPrefix  = FMCGetHref( document.location );
  25.     var href        = FMCEscapeHref( a.href );
  26.     
  27.     if ( href.substring( 0, hrefPrefix.length ) != hrefPrefix )
  28.     {
  29.         return;
  30.     }
  31.     
  32.     var hash        = a.href.substring( a.href.lastIndexOf( "#" ) + 1 );
  33.     var bookmark    = null;
  34.     
  35.     for ( var i = 0; i < document.anchors.length; i++ )
  36.     {
  37.         var currAnchor  = document.anchors[i];
  38.         
  39.         if ( currAnchor.name == hash )
  40.         {
  41.             bookmark = currAnchor;
  42.             
  43.             break;
  44.         }
  45.     }
  46.     
  47.     if ( bookmark && typeof( FMCUnhide ) == "function" )
  48.     {
  49.         FMCUnhide( window, bookmark );
  50.     }
  51. }
  52.  
  53. function FMCClickHandler( e )
  54. {
  55.     var target  = null;
  56.     
  57.     if ( !e )
  58.     {
  59.         e = window.event;
  60.     }
  61.     
  62.     if ( e.srcElement )
  63.     {
  64.         target = e.srcElement;
  65.     }
  66.     else if ( e.target )
  67.     {
  68.         target = e.target;
  69.     }
  70.     
  71.     (target.nodeName == "A") ? FMCCheckForBookmarkInternal( target ) : false;
  72.     
  73.     //
  74.     
  75.     if ( typeof( gJustPopped ) == "undefined" )
  76.     {
  77.         return;
  78.     }
  79.     
  80.     if ( !gJustPopped && gPopupObj && gPopupObj.style.display != "none" )
  81.     {
  82.         if ( typeof( FMCContainsClassRoot ) == "function" && FMCContainsClassRoot( gPopupObj.className, "MCKLinkBody" ) )
  83.         {
  84.             gPopupObj.parentNode.removeChild( gPopupObj );
  85.             gPopupBGObj.parentNode.removeChild( gPopupBGObj );
  86.         }
  87.         else
  88.         {
  89.             if ( gImgNode && typeof( FMCImageSwap ) == "function"  )
  90.             {
  91.                 FMCImageSwap( gImgNode, "swap" );
  92.                 gImgNode = null;
  93.             }
  94.             
  95.             // Reset fading
  96.             
  97.             if ( gPopupObj.filters )
  98.             {
  99.                 gPopupObj.style.filter = "alpha( opacity = 0 )";
  100.                 gPopupBGObj.style.filter = "alpha( opacity = 0 )";
  101.             }
  102.             else if ( gPopupObj.style.MozOpacity != null )
  103.             {
  104.                 gPopupObj.style.MozOpacity = "0.0";
  105.                 gPopupBGObj.style.MozOpacity = "0.0";
  106.             }
  107.             
  108.             //
  109.  
  110.             gPopupObj.style.display = "none";
  111.             gPopupBGObj.parentNode.removeChild( gPopupBGObj );
  112.         }
  113.         
  114.         if ( gFadeID != 0 )
  115.         {
  116.             clearInterval( gFadeID );
  117.         }
  118.         
  119.         gPopupObj = null;
  120.         gPopupBGObj = null;
  121.         gFadeID = 0;
  122.         
  123.         if ( gTextPopupBody )
  124.         {
  125.             gTextPopupBody = null;
  126.             gTextPopupBodyBG = null;
  127.             window.onresize = null;
  128.         }
  129.     }
  130.     
  131.     gJustPopped = false;
  132. }
  133.